package com.scy.boot06.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class BMIController {

    @RequestMapping("/bmi")
    public String bmi(double h,double w){
        double bmi = w/(h*h);
        if (bmi < 18.5){
            return "兄弟你廋了";
        }
        if (bmi < 22){
            return "身体健康";
        }
        if (bmi < 28){
            return "兄弟你有点胖";
        }
        return "兄弟你太胖了";
    }

}
